<template>
  <div class="login">
    <div class="login-container">
      <div class="login-wrapper">
        <div class="left-content">
          <a-carousel class="carousel" autoplay>
            <!-- <img v-for="(item, index) in srcList" :key="index" style="height: 540px" :src="item" /> -->
            <img src="~@/assets/figure-2.jpg" />
          </a-carousel>
        </div>
        <div class="right-content">
          <div v-show="!isForgetPassword">
            <div class="title">
              <router-link to="/welcome">
                <img src="~@/assets/logo.png" class="logo" />贵阳市住房保障管理系统
              </router-link>
              <div class="subtitle" v-if="issubtitle == 1">（贵阳准入系统）</div>
              <div class="subtitle" v-if="issubtitle == 2">（后续管理系统）</div>
              <div class="subtitle" v-if="issubtitle == 3">（自行备案系统）</div>
            </div>
            <div class="tab-option">
              <span :class="{ 'tab-option-active': isActve }" @click="isActve = !isActve">账号登录</span>
              <span>|</span>
              <span :class="{ 'tab-option-active': !isActve }" @click="isActve = !isActve">手机快捷登录</span>
            </div>
            <account v-show="isActve"></account>
            <phone v-show="!isActve"></phone>
          </div>
          <forget-password v-show="isForgetPassword"></forget-password>
          <div class="tips">
            推荐使用<a href="https://browser.360.cn/se/" target="_blank">360浏览器极速模式</a>、<a
              href="https://www.google.cn/chrome/"
              target="_blank"
              >谷歌浏览器</a
            >、<a href="http://www.firefox.com.cn/" target="_blank">火狐浏览器</a>
          </div>
        </div>
      </div>
    </div>
    <div class="copyright">
      <p>
        <span>技术支持单位：<a href="http://www.jzsmart.com/" target="_blank">贵阳佳智软件开发有限公司</a></span
        >&nbsp;&nbsp;
        <span>服务电话：0851-85865358</span>
      </p>
      <p>© 2022-现在 贵阳市住房保障中心 版权所有</p>
    </div>
  </div>
</template>

<script>
import ACarousel from 'ant-design-vue/lib/carousel'
import Account from './login/account'
import Phone from './login/phone'
import ForgetPassword from './login/ForgetPassword'
import 'ant-design-vue/lib/carousel/style'
export default {
  components: {
    ForgetPassword,
    ACarousel,
    Account,
    Phone,
  },
  data() {
    return {
      isActve: true,
      isForgetPassword: false,
      srcList: [],
      issubtitle: localStorage.getItem('into') ? localStorage.getItem('into') : 1,
    }
  },
  methods: {},
}
</script>
<style lang="less" scoped>
.logo {
  width: 35px;
  height: 35px;
  margin-right: 10px;
}
.carousel {
  img {
    height: 540px;
  }
}
.login {
  height: 100%;
  background: url(~@/assets/bg-1.jpg) no-repeat;
  background-size: 100% 100%;
  min-width: max-content;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  .login-container {
    .login-wrapper {
      height: 540px;
      display: flex;
      .left-content {
        width: 620px;
        border-radius: 10px 0 0 10px;
        overflow: hidden;
      }
      .right-content {
        width: 380px;
        padding: 20px 40px;
        background-color: #fff;
        border-radius: 0 10px 10px 0;
        -moz-user-select: none; /*火狐*/
        -webkit-user-select: none; /*webkit浏览器*/
        -ms-user-select: none; /*IE10*/
        -khtml-user-select: none; /*早期浏览器*/
        user-select: none;
        .title {
          font-size: 20px;
          font-weight: bold;
          a {
            color: #000;
          }
        }
        .tab-option {
          margin: 30px 0;
          color: #b3b9c7;
          cursor: pointer;
          & > :nth-child(2) {
            margin: 0 10px;
          }
          .tab-option-active {
            color: #40a9ff;
          }
        }
        .tips {
          font-size: 12px;
          color: #b3b9c7;
        }
      }
    }
  }
  .copyright {
    position: relative;
    bottom: -14%;
    text-align: center;
    p {
      margin-bottom: 6px;
    }
  }
}
</style>
<style scoped>
.ant-carousel >>> .slick-dots-bottom {
  bottom: 40px;
}
.subtitle {
  text-align: center;
  font-size: 16px;
}
</style>
